﻿<?php get_header(); ?>
	<div class='container'>
	<div class="sidebar"><?php include (TEMPLATEPATH."/sidebar.php");?></div>
		<?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); ?>
		<h1 class="page-title"><?php echo $term->name; ?> Archives</h1>
		<?php $args = array( 'post_type' => 'san-pham','loai-san-pham'=>$term->slug);
			$loop = new WP_Query( $args );
			
		?>
		<?php if (have_posts()) : ?>
        <?php while ($loop->have_posts()) : $loop->the_post(); ?>
          <div class="post type-post hentry">
            <h2 class="entry-title">
              <a href="<?php echo get_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark">
                <?php the_title(); ?>
              </a>
            </h2>
			
            <div class="entry-meta">
              <span class="meta-prep meta-prep-author">Posted on</span> 
              <a href="<?php echo get_permalink(); ?>" title="<?php the_time( 'g:i a' ); ?>" rel="bookmark">
              <span class="entry-date"><?php the_time( 'F j, Y' ); ?></span></a>
            </div><!-- .entry-meta -->

            <div class="entry-summary">
              <?php the_excerpt(); ?>
            </div><!-- .entry-summary -->
          </div>

        <?php endwhile; ?>
      <?php endif; ?>
	</div>
<?php get_footer(); ?>
<?php get_footer(); ?>